use std::sync::Arc;
use crate::{
    abstractions::{data::Data::*,task::TaskAbstraction},
    protocol::type_schema::TypeSchema::*
};

pub struct BuiltinTest;

impl BuiltinTest {
    pub fn test_1() -> Arc<TaskAbstraction> {
        Arc::new(TaskAbstraction::Builtin("test_1".into(), Str, Int, Arc::new(|x|Ok(DataInt(0)))))
    }
    pub fn test_2() -> Arc<TaskAbstraction> {
        Arc::new(TaskAbstraction::Builtin("test_2".into(), List(Box::new(Int)), List(Box::new(Str)), Arc::new(|x|{
            let l = vec![DataInt(1), DataInt(2), DataInt(3)];  
            Ok(DataList(l))
        })))
    }
}
